//
//  MDHPT.h
//  JSTech
//
//  Created by 高得华 on 2019/9/28.
//  Copyright © 2020 华&梅. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

//! Project version number for MDHPT.
FOUNDATION_EXPORT double MDHPTVersionNumber;

//! Project version string for MDHPT.
FOUNDATION_EXPORT const unsigned char MDHPTVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <MDHPT/PublicHeader.h>

///Model解析
#if __has_include(<MJExtension/MJExtension.h>)
#import <MJExtension/MJExtension.h>
#else
#import "MJExtension.h"
#endif

#if __has_include(<AFNetworking/AFNetworking-umbrella.h>)
#import <AFNetworking/AFNetworking-umbrella.h>
#else
#import "AFNetworking-umbrella.h"
#endif

#if __has_include(<MJRefresh/MJRefresh.h>)
#import <MJRefresh/MJRefresh.h>
#else
#import "MJRefresh.h"
#endif

#if __has_include(<Masonry/Masonry.h>)
#import <Masonry/Masonry.h>
#else
#import "Masonry.h"
#endif

#if __has_include(<YYCategories/YYCategories.h>)
#import <YYCategories/YYCategories.h>
#else
#import "YYCategories.h"
#endif

#if __has_include(<SDWebImage/SDWebImage-umbrella.h>)
#import <SDWebImage/SDWebImage-umbrella.h>
#else
#import "SDWebImage-umbrella.h"
#endif

#if __has_include(<SDWebImageWebPCoder/SDWebImageWebPCoder.h>)
#import <SDWebImageWebPCoder/SDWebImageWebPCoder.h>
#else
#import "SDWebImageWebPCoder.h"
#endif

#if __has_include(<CYLTabBarController/CYLTabBarController.h>)
#import <CYLTabBarController/CYLTabBarController.h>
#else
#import "CYLTabBarController.h"
#endif

#if __has_include(<JDStatusBarNotification/JDStatusBarNotification.h>)
#import <JDStatusBarNotification/JDStatusBarNotification.h>
#else
#import "JDStatusBarNotification.h"
#endif

///键盘管理者
#if __has_include(<IQKeyboardManager/IQKeyboardManager.h>)
#import <IQKeyboardManager/IQKeyboardManager.h>
#else
#import "IQKeyboardManager.h"
#endif

#if __has_include(<MDHPT/MDHPT.h>)
#import <MDHPT/MDHMacro.h>
#import <MDHPT/LEEAlert.h>
#import <MDHPT/MHFileManager.h>


//#import <MDHPT/MDHPTProtocol.h>
#import <MDHPT/MDHMacroHeader.h>
#import <MDHPT/MDHViewModel.h>
#import <MDHPT/MDHViewModelServices.h>
#import <MDHPT/MDHHTTPService.h>
#import <MDHPT/MDHHTTPRequest.h>
#import <MDHPT/MDHURLParameters.h>
#import <MDHPT/SAMKeychain+MDHPTUtil.h>
#import <MDHPT/SAMKeychain.h>
#import <MDHPT/MDHRACExtension.h>
#import <MDHPT/MDHFileConstant.h>
#import <MDHPT/UIView+HJViewStyle.h>
#import <MDHPT/MDHPTNavigationProtocol.h>
#import <MDHPT/MDHPTProtocol.h>
#import <MDHPT/NSObject+MDHNSObject.h>

#import <MDHPT/UIView+MHFrame.h>
#import <MDHPT/BAPrivacyManager.h>
#import <MDHPT/BAKit_Singleton.h>
#import <MDHPT/GEdwardJTOAPPInter.h>
#import <MDHPT/GEdwardInfoController.h>
#import <MDHPT/MMWDHEnDe.h>
#import <MDHPT/MDHTableViewModel.h>
#import <MDHPT/JXPagerView.h>
#import <MDHPT/JXPagerMainTableView.h>
#import <MDHPT/JXPagerListContainerView.h>
#import <MDHPT/JXCategoryViewDefines.h>
#import <MDHPT/MDHRouter.h>
#import <MDHPT/MDHViewController.h>
#import <MDHPT/MDHTableViewController.h>
#import <MDHPT/MDHSegmentedControlController.h>
#import <MDHPT/MDHWKWebViewController.h>
#import <MDHPT/MDHNavigationController.h>
#import <MDHPT/MDHTabBarController.h>
#import <MDHPT/MDHNavigationControllerStack.h>
#import <MDHPT/MDHTabBarViewModel.h>
#import <MDHPT/MDHViewModelServicesImpl.h>
//#import <MDHPT/WRNavigationBar.h>
#import <MDHPT/MDHTextView.h>
#import <MDHPT/YYText.h>
#import <MDHPT/TTGTagCollectionView.h>
#import <MDHPT/TTGTextTagCollectionView.h>

#import <MDHPT/HanyuPinyinOutputFormat.h>
#import <MDHPT/PinYinForObjc.h>
#import <MDHPT/PinyinHelper.h>
#import <MDHPT/ChineseInclude.h>


#import <MDHPT/WSDatePickerView.h>
#import <MDHPT/NSDate+Extension.h>

#import <MDHPT/CRBoxInputView.h>
#import <MDHPT/YBPopupMenu.h>
#import <MDHPT/LFStarsView.h>
#import <MDHPT/LFBadge.h>
#import <MDHPT/WMDragView.h>

#import <MDHPT/MMWPTPhotoBrowserHeader.h>
#import <MDHPT/LFToGIF.h>
#import <MDHPT/XHLaunchAd.h>

#import <MDHPT/RACSubscriber+AFProgressCallbacks.h>
#import <MDHPT/ReactiveObjC.h>

#import <MDHPT/MBProgressHUD.h>
#import <MDHPT/MBProgressHUD+Add.h>
#import <MDHPT/UIViewController+HUD.h>

///转场动画
#import <MDHPT/MDHTransitionManager.h>

#else

#import "MDHMacro.h"
#import "LEEAlert.h"
#import "MHFileManager.h"
#import "UIView+HJViewStyle.h"

//#import "MDHPTProtocol.h"
#import "MDHMacroHeader.h"
#import "MDHViewModel.h"
#import "MDHViewModelServices.h"
#import "MDHHTTPService.h"
#import "MDHHTTPRequest.h"
#import "MDHURLParameters.h"
#import "SAMKeychain.h"
#import "SAMKeychain+MDHPTUtil.h"
#import "MDHRACExtension.h"
#import "MDHFileConstant.h"
#import "MDHPTNavigationProtocol.h"
#import "MDHPTProtocol.h"
#import "NSObject+MDHNSObject.h"

#import "UIView+MHFrame.h"
#import "BAPrivacyManager.h"
#import "BAKit_Singleton.h"
#import "GEdwardJTOAPPInter.h"
#import "GEdwardInfoController.h"
#import "MMWDHEnDe.h"
#import "MDHTableViewModel.h"
#import "JXPagerView.h"
#import "JXPagerMainTableView.h"
#import "JXPagerListContainerView.h"
#import "JXCategoryViewDefines.h"
#import "MDHRouter.h"
#import "MDHViewController.h"
#import "MDHTableViewController.h"
#import "MDHSegmentedControlController.h"
#import "MDHWKWebViewController.h"
#import "MDHNavigationController.h"
#import "MDHTabBarController.h"
#import "MDHNavigationControllerStack.h"
#import "MDHTabBarViewModel.h"
#import "MDHViewModelServicesImpl.h"
//#import "WRNavigationBar.h"
#import "MDHTextView.h"
#import "YYText.h"
#import "TTGTagCollectionView.h"
#import "TTGTextTagCollectionView.h"

#import "HanyuPinyinOutputFormat.h"
#import "PinYinForObjc.h"
#import "PinyinHelper.h"
#import "ChineseInclude.h"

#import "WSDatePickerView.h"
#import "NSDate+Extension.h"

#import "CRBoxInputView.h"
#import "YBPopupMenu.h"
#import "LFStarsView.h"
#import "LFBadge.h"
#import "WMDragView.h"

#import "MMWPTPhotoBrowserHeader.h"
#import "LFToGIF.h"
#import "XHLaunchAd.h"

#import "RACSubscriber+AFProgressCallbacks.h"
#import "ReactiveObjC.h"

#import "MBProgressHUD.h"
#import "MBProgressHUD+Add.h"
#import "UIViewController+HUD.h"

///转场动画
#import "MDHTransitionManager.h"

#endif




//MARK: - ==== 颜色相关
///随机色
static inline UIColor * _Nonnull kColor_MDHRGBA(CGFloat r, CGFloat g, CGFloat b, CGFloat a) {
    return [UIColor colorWithRed:(r / 255.0) green:(g / 255.0) blue:(b / 255.0) alpha:a];
}
///随机色
static inline UIColor * _Nonnull kColor_MDHRGB(CGFloat r, CGFloat g, CGFloat b) {
    return kColor_MDHRGBA(r, g, b, 1.0);
}
///Hex初始化 颜色 alpha 透明度
static inline UIColor * _Nonnull kColor_MDHHexA(NSString * _Nonnull name, CGFloat alpha) {//4876FF 1E90FF
    return [UIColor colorWithHexStr:name alpha:alpha];
}
///Hex初始化 颜色
static inline UIColor * _Nonnull kColor_MDHHex(NSString * _Nonnull name) {//4876FF 1E90FF
    return [UIColor colorWithHexStr:name alpha:1.0];
}
///主题色///#FFE500  品牌色 用于按钮和icon 如按钮、标签图标、账户背景、选中的状态等*/
static inline UIColor * _Nonnull kColor_MDHTheme() {
    return [UIColor colorWithHexStr:@"#00BFE5" alpha:1.0];
}
///对立色值
static inline UIColor * _Nonnull kColor_MDHNoTheme() {
    return [UIColor colorWithHexStr:@"#7D6BB9" alpha:1.0];
}
/// #333333  用于按钮颜色和icon 如勾选按钮、充值按钮、icon的描边*/
static inline UIColor * _Nonnull kColor_MDH333333() {
    return [UIColor colorWithHexStr:@"#333333" alpha:1.0];
}
///#666666  浅灰色字体颜色 */
static inline UIColor * _Nonnull kColor_MDH666666() {
    return [UIColor colorWithHexStr:@"#666666" alpha:1.0];
}
///#999999  */
static inline UIColor * _Nonnull kColor_MDH999999() {
    return [UIColor colorWithHexStr:@"#999999" alpha:1.0];
}
///#EEEEEE  分界线的颜色色值 */
static inline UIColor * _Nonnull kColor_MDHEEEEEE() {
    return [UIColor colorWithHexStr:@"#EEEEEE" alpha:1.0];
}
///#DDDDDD  分界线的颜色色值 */
static inline UIColor * _Nonnull kColor_MDHDDDDDD() {
    return [UIColor colorWithHexStr:@"#DDDDDD" alpha:1.0];
}
///#F2F2F2  分界线的颜色色值 */
static inline UIColor * _Nonnull kColor_MDHF2F2F2() {
    return [UIColor colorWithHexStr:@"#F2F2F2" alpha:1.0];
}
///不可按颜色 #CBCBCB */
static inline UIColor * _Nonnull kColor_MDHCBCBCB() {
    return [UIColor colorWithHexStr:@"#CBCBCB" alpha:1.0];
}
///强调文字FF4500
static inline UIColor * _Nonnull kColor_MDMM4500() {
    return [UIColor colorWithHexStr:@"#FF4500" alpha:1.0];
}
///767676
static inline UIColor * _Nonnull kColor_MDH767676() {
    return [UIColor colorWithHexStr:@"#767676" alpha:1.0];
}
///#8E8E8E
static inline UIColor * _Nonnull kColor_MDH8E8E8E() {
    return [UIColor colorWithHexStr:@"#8E8E8E" alpha:1.0];
}
///#424242
static inline UIColor * _Nonnull kColor_MDH424242() {
    return [UIColor colorWithHexStr:@"#424242" alpha:1.0];
}
///透明色
static inline UIColor * _Nonnull kColor_MDHAlpha0() {
    return [[UIColor whiteColor] colorWithAlphaComponent:0.0001];
}
///#BB6FFF
static inline UIColor * _Nonnull kColor_MDH8976CA() {
    return [UIColor colorWithHexStr:@"#BB6FFF" alpha:1.0];
}
///#FFFFFF 白色
static inline UIColor * _Nonnull kColor_MDHFFFFFF() {
    return [UIColor colorWithHexStr:@"#FFFFFF" alpha:1.0];
}
///#000000 黑色
static inline UIColor * _Nonnull kColor_MDH000000() {
    return [UIColor colorWithHexStr:@"#000000" alpha:1.0];
}

///适配暗黑模式
static inline UIColor * _Nonnull kColor_MDHDarkMode(UIColor * _Nullable light, UIColor * _Nullable dark) {
    if (@available(iOS 13.0, *)) {
        return [UIColor colorWithDynamicProvider:^UIColor * _Nonnull(UITraitCollection * _Nonnull trainCollection) {
            if ([trainCollection userInterfaceStyle] == UIUserInterfaceStyleLight) {
                return light;
            } else {
                return dark;
            }
        }];
    } else {
        return light ? light : (dark ? dark : [kColor_MDHFFFFFF() colorWithAlphaComponent:0.00001]);
    }
}

/// 适配暗黑模式 传入字符串 传入 透明度
static inline UIColor * _Nonnull kColor_MDHDarkModeAlpha(NSString * _Nullable lightStr, CGFloat li_al, NSString * _Nullable darkStr, CGFloat dr_al) {
    return kColor_MDHDarkMode(kColor_MDHHexA(lightStr, li_al), kColor_MDHHexA(darkStr, dr_al));
}

/// 适配暗黑模式 传入字符串
static inline UIColor * _Nonnull kColor_MDHDarkModeStr(NSString * _Nullable lightStr, NSString * _Nullable darkStr) {
    return kColor_MDHDarkModeAlpha(lightStr, 1.0, darkStr, 1.0);
}

//MARK: - ==== 默认图
///网络图片的占位图片
static inline UIImage * _Nullable MDHWebImagePlaceholder() {
    return [UIImage imageNamed:@"moren_tupian_fang"];
}

///网络头像
static inline UIImage * _Nullable MDHWebAvatarImagePlaceholder() {
    return [UIImage imageNamed:@"moren_touxiang"];
}

///banner及其长图 的网络占位图
static inline UIImage * _Nullable MDHWebBannerAvatarPlaceholder() {
    return [UIImage imageNamed:@"moren_banner"];
}


//MARK: - ===== 字体
///苹方-简 常规体 PingFangTC-Regular
static inline UIFont * _Nonnull kFont_PingFangSCRegular(CGFloat size) {
    return [UIFont fontWithName:kMDHPingFangSCRegular size:size];
}

///苹方-简 中黑体 粗体 PingFangSC-Medium
static inline UIFont * _Nonnull kFont_PingFangSCMedium(CGFloat size) {
    return [UIFont fontWithName:kMDHPingFangSCMedium size:size];
}

///苹方-简 中粗体 PingFangSC-Semibold
static inline UIFont * _Nonnull kFont_PingFangSCSemibold(CGFloat size) {
    return [UIFont fontWithName:kMDHPingFangSCSemibold size:size];
}

 
///自定义字体
///DINPro-BlackItalic
static inline UIFont * _Nonnull kFont_DINPro_BlackItalic(CGFloat size) {
    return [UIFont fontWithName:@"DINPro-BlackItalic" size:size];
}

///DINPro-Medium
static inline UIFont * _Nonnull kFont_DINPro_Medium(CGFloat size) {
    return [UIFont fontWithName:@"DINPro-Medium" size:size];
}

///DINPro-Bold_13934
static inline UIFont * _Nonnull kFont_DINPro_Bold_13934(CGFloat size) {
    return [UIFont fontWithName:@"DINPro-Bold_13934" size:size];
}

///DINPro-Regular
static inline UIFont * _Nonnull kFont_DINPro_Regular(CGFloat size) {
    return [UIFont fontWithName:@"DINPro-Regular" size:size];
}

//kFont_DINPro_Bold
static inline UIFont * _Nonnull kFont_DINPro_Bold(CGFloat size) {
    return [UIFont fontWithName:@"DINPro-Bold" size:size];
}

//kFont_DIN_Condensed_Bold
static inline UIFont * _Nonnull kFont_DIN_Condensed_Bold(CGFloat size) {
    return [UIFont fontWithName:@"DIN_Condensed_Bold.woff.ttf" size:size];
}
